home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / gfx / misc / gnuplot-3.7src.lha / gnuplot-3.7src / gnuplot-3.7.lha / gnuplot-3.7 / makefile.tc < prev    next >
Makefile  |  1998-12-01  |  8KB  |  270 lines

  1. # make file for Borland C++ 3.x
  2. # uses Borland proprietary overlay manager
  3. # Modified from the TurboC makefile by Maurice Castro
  4. # The compile and link includes debug flags.  Take them out if you
  5. # do not want them included  (-y -v -M, /m /s /v /l)
  6. #
  7. # the makefile no longer depends on a linker options file.
  8. # this file will be created as needed.                (AL 07/17/92)
  9. #
  10. # The compiler commands lines have become too long so I
  11. # modified the make file to use an options file to store $(CFLAGS) 
  12. #                                                              (ALM 08/08/94)
  13. #
  14. # You will probably also need to edit term.h to not include some of the
  15. # terminal types which you are not going to use, otherwise you will get a 
  16. # message about too much global data defined in term.c.
  17. #
  18.  
  19. # where to place gnuplot.gih helpfile
  20. HELPFILE = gnuplot.gih
  21. # location of Turbo C compiler
  22. TC = c:\bc
  23. #TC = c:\tc
  24. # name of C compiler
  25. CC = bcc
  26. #CC = tcc
  27. # location of TLINK.EXE and TCC.EXE or BCC.EXE
  28. BIN = $(TC)\bin\\
  29. #BIN =
  30. # location of BGI files,
  31. # change this line if not in TC directory, i.e. $(TC)\bgi
  32. BGI = $(TC)\bgi
  33. # location of bgiobj.exe tool - convertion of BGI to a linkable OBJ file.
  34. BGIOBJ = $(TC)\bgi\bgiobj
  35. #BGIOBJ =
  36. # location of the system libraries
  37. LIB = $(TC)\lib\\
  38. # Super VGA support: name and location of the SuperVGA driver
  39. SVGA_BGI = c:\bc\bgi\svga256.bgi
  40. # the memory model to use (l = large code, large data; h = huge)
  41. MODEL = l
  42.  
  43. # -c means don't link, -f means emulate 8087 if not present
  44. # -m? says which model to use
  45. # -M means produce link map
  46. # -y means include line numbers for debugger
  47. # -v means include debug info
  48. # -w- means ignore warnings and do not report them
  49. # -DREADLINE to use the history/line editing capability. If you want this
  50. #    capability add -DREADLINE to CFLAGS
  51. # -DLITE means no hiddenline removal to conserve memory
  52. # -Z -2 -3 -G -O are optimization flags (-2 produces 286 only code)
  53. #CFLAGS1 = -Ff=256 -c -f -m$(MODEL) -w- -Z -2 -G -O -n.
  54. # HBB: specialise on '386 or higher, and take '-c' out, so
  55. #      the flags can be used for doc2xxx and bf_test as well:
  56. CFLAGS1 = -Ff=256 -f -m$(MODEL) -w- -Z -3 -f287 -d -G -n. -v -y
  57. #CFLAGS2 = -I$(TC)\include -DLITE -DMSDOS -DPC -DREADLINE -DHAVE_STRNICMP
  58. # HBB: try without -DLITE, to activate hidden-lining (for trying)
  59. #      and #define ANSI_C!
  60. CFLAGS2 = -I$(TC)\include -DMSDOS=1 -DPC -DANSI_C -DREADLINE=1 -DHAVE_GETCWD -DHAVE_STRNICMP
  61. CFLAGS3 = -DHAVE_SLEEP -DEXTERN_ERRNO -DHAVE_STRING_H -DHAVE_VALUES_H
  62.  
  63. # separate set of FLAGS (both CFLAGS and LDFLAGS for the doc2xxx tools:
  64. DOC2XXX_FLAGS = -Idocs -Iterm @cflags.tc -ml -L$(TC)\lib
  65.  
  66. TERMFLAGS =
  67.  
  68. # With Overlay Support
  69. OVLY1 = -Y
  70. OVLY2 = -Yo
  71. OVERLIB = $(LIB)overlay
  72. SLASHO = /o
  73. ODASH = /o-
  74. # Without Overlay Support
  75. #OVLY1 =
  76. #OVLY2 =
  77. #OVERLIB =
  78. #SLASHO =
  79. #ODASH =
  80.  
  81. OBJ1 =  bitmap.obj command.obj contour.obj eval.obj graphics.obj graph3d.obj
  82. OBJ2 =    help.obj internal.obj misc.obj parse.obj plot.obj plot2d.obj \
  83.     plot3d.obj readline.obj
  84. OBJ3 =  scanner.obj set.obj show.obj specfun.obj standard.obj stdfn.obj \
  85.     term.obj time.obj util.obj
  86. OBJ4 =    version.obj binary.obj interpol.obj fit.obj matrix.obj
  87. OBJ5 =  datafile.obj alloc.obj hidden3d.obj util3d.obj
  88.  
  89. # uncomment svgaf.obj if you wish to include Super VGA support
  90. OBJBGI= cgaf.obj egavgaf.obj hercf.obj attf.obj pc3270f.obj svgaf.obj
  91.  
  92. OBJS =    $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJBGI)
  93.  
  94. CSOURCE5 = term\aed.trm term\cgi.trm term\dumb.trm term\dxy.trm \
  95.     term\eepic.trm term\epson.trm term\fig.trm term\hp26.trm \
  96.     term\hp2648.trm term\hpgl.trm term\hpljii.trm
  97. CSOURCE6 = term\impcodes.h term\imagen.trm term\object.h \
  98.     term\iris4d.trm term\kyo.trm term\latex.trm term\pc.trm
  99. CSOURCE7 = term\post.trm term\qms.trm term\regis.trm term\sun.trm \
  100.     term\t410x.trm term\tek.trm term\unixpc.trm term\unixplot.trm \
  101.     term\v384.trm term\x11.trm
  102. CSOURCE8 = contour.c specfun.c binary.c interpol.c
  103.  
  104. all: cflags.tc gnuplot.exe $(HELPFILE) demo\bf_test.exe
  105.  
  106. # use linkopt.tc and cflags.tc to avoid command-line overflow
  107.  
  108. gnuplot.exe: $(OBJS) linkopt.tc cflags.tc
  109. # With or without debug information (select one)
  110.     $(BIN)tlink /m /s /v /l @linkopt.tc
  111. #    $(BIN)tlink @linkopt.tc
  112.  
  113. # create linker options file
  114. # note that when you change the model or switch overlaying,
  115. # you will have to execute 'make clean'
  116.  
  117. linkopt.tc: makefile.tc
  118.     echo  >linkopt.tc $(LIB)C0$(MODEL) +
  119.     echo >>linkopt.tc $(SLASHO) $(OBJ1) +
  120.     echo >>linkopt.tc $(OBJ2) +
  121.     echo >>linkopt.tc $(OBJ3) +
  122.     echo >>linkopt.tc $(OBJ4) +
  123.     echo >>linkopt.tc $(OBJ5) +
  124.     echo >>linkopt.tc $(ODASH) $(OBJBGI) +
  125.     echo >>linkopt.tc ,gnuplot,gnuplot, +
  126.     echo >>linkopt.tc $(OVERLIB) +
  127.     echo >>linkopt.tc $(LIB)emu +
  128.     echo >>linkopt.tc $(LIB)math$(MODEL) +
  129.     echo >>linkopt.tc $(LIB)c$(MODEL) +
  130.     echo >>linkopt.tc $(LIB)graphics
  131. #    echo >>linkopt.tc -----
  132. #    echo >>linkopt.tc this file is generated automatically. don't change it, change the makefile.
  133.  
  134. # Create an options file for the C flags to avoid command line overflow
  135. # (the only way I could think of to make sure this file was up to date
  136. # and present when needed was to make all object files dependant upon
  137. # it - ugly) <- this may cause error, do make clean instead.
  138. cflags.tc: makefile.tc
  139.     echo  >cflags.tc $(CFLAGS1) 
  140.     echo >>cflags.tc $(CFLAGS2)
  141.     echo >>cflags.tc $(CFLAGS3)
  142.  
  143.  
  144.  
  145. # default rules
  146.  
  147. .c.obj:
  148.     $(BIN)$(CC) -c $(OVLY2) @cflags.tc $<
  149.  
  150. # The default for files is to be compiled for overlaying if OVLY1 and
  151. # OVLY2 are defined.  plot.c and parse.c are not suitable for overlaying.
  152.  
  153. bitmap.obj: bitmap.c bitmap.h plot.h
  154.  
  155. command.obj: command.c plot.h setshow.h help.h fit.h
  156.         $(BIN)$(CC) -c $(OVLY2) @cflags.tc -DHELPFILE=\"$(HELPFILE)\" command.c
  157.  
  158. contour.obj: contour.c plot.h
  159.  
  160. eval.obj: eval.c plot.h
  161.  
  162. graphics.obj: graphics.c plot.h setshow.h
  163.  
  164. graph3d.obj: graph3d.c plot.h setshow.h
  165.  
  166. hidden3d.obj: hidden3d.c plot.h setshow.h
  167.  
  168. util3d.obj: util3d.c plot.h setshow.h
  169.  
  170. fit.obj: fit.c fit.h matrix.h plot.h
  171.  
  172. matrix.obj: matrix.c matrix.h fit.h
  173.  
  174. help.obj: help.c plot.h help.h
  175.  
  176. internal.obj: internal.c plot.h
  177.  
  178. misc.obj: misc.c plot.h setshow.h help.h
  179.  
  180. parse.obj: parse.c plot.h
  181.         $(BIN)$(CC) -c $(OVLY1) @cflags.tc parse.c
  182.  
  183. plot.obj: plot.c plot.h setshow.h
  184.         $(BIN)$(CC) -c $(OVLY1) @cflags.tc plot.c
  185.  
  186. readline.obj: readline.c
  187.  
  188. scanner.obj: scanner.c plot.h
  189.  
  190. set.obj: set.c plot.h setshow.h
  191.  
  192. show.obj: show.c plot.h setshow.h
  193.     $(BIN)$(CC) -c $(OVLY2) @cflags.tc -DHELPFILE="$(HELPFILE)" show.c
  194.  
  195. specfun.obj: specfun.c
  196.  
  197. standard.obj: standard.c plot.h
  198.  
  199. stdfn.obj: stdfn.c stdfn.h
  200.  
  201. interpol.obj: interpol.c plot.h setshow.h
  202.  
  203. # the CSOURCE? dependencies are not up to date (but who cares)
  204. term.obj: term.c term.h plot.h set.c show.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
  205.         $(BIN)$(CC) -c $(OVLY2) @cflags.tc $(TERMFLAGS) -DDEFAULTTERM="dospc" -Iterm -I. term.c
  206.  
  207. util.obj: util.c plot.h
  208.  
  209. version.obj: version.c
  210.  
  211. # convert gnuplot.doc to gnuplot.gih
  212. $(HELPFILE): doc2gih.exe docs\gnuplot.doc
  213.     doc2gih docs\gnuplot.doc $(HELPFILE)
  214.  
  215. doc2gih.exe: docs\doc2gih.c docs\termdoc.c
  216.     $(BIN)$(CC) $(DOC2XXX_FLAGS) -edoc2gih.exe docs\doc2gih.c docs\termdoc.c
  217.  
  218. doc2tex.exe: docs\doc2tex.c
  219.     $(BIN)$(CC) $(DOC2XXX_FLAGS) -DALL_TERM_DOC docs\doc2tex.c
  220.  
  221. demo\bf_test.exe: bf_test.c binary.obj alloc.obj
  222.     $(BIN)$(CC) -edemo\bf_test.exe @cflags.tc -L$(TC)\lib bf_test.c binary.obj alloc.obj
  223.     cd demo
  224.     bf_test
  225.     cd ..
  226.  
  227. # convert Borland Graphics Interface files to object for linking
  228. cgaf.obj: $(BGI)\cga.bgi
  229.     $(BGIOBJ) /F $(BGI)\cga
  230.  
  231. egavgaf.obj: $(BGI)\egavga.bgi
  232.     $(BGIOBJ) /F $(BGI)\egavga
  233.  
  234. hercf.obj: $(BGI)\herc.bgi
  235.     $(BGIOBJ) /F $(BGI)\herc
  236.  
  237. attf.obj: $(BGI)\att.bgi
  238.     $(BGIOBJ) /F $(BGI)\att
  239.  
  240. pc3270f.obj: $(BGI)\pc3270.bgi
  241.     $(BGIOBJ) /F $(BGI)\pc3270
  242.  
  243. svgaf.obj: $(SVGA_BGI)
  244.     $(BGIOBJ) /F $(SVGA_BGI) svgaf.obj _SVGA_driver_far SVGA_TEXT
  245.  
  246. # $(OBJS): cflags.tc # this causes error message
  247.  
  248. # clean target - remove all temp files, but leave executable intact
  249. # needed when changing configuration (model or overlaying)
  250.  
  251. clean:
  252.     del *.obj
  253.     del gnuplot.map
  254.     del linkopt.tc
  255.     del doc2gih.exe
  256.     del cflags.tc
  257.  
  258. # realclean target - remove all files created by the makefile
  259.  
  260. realclean: clean
  261.     del gnuplot.exe
  262.     del gnuplot.gih
  263.     del demo\soundfit.par
  264.     del demo\fit.log
  265.     del demo\bf_test.exe
  266.     del demo\bf_test.map
  267.     del demo\binary1
  268.     del demo\binary2
  269.     del demo\binary3
  270.